<div class="page-content" >
	<div class="panel panel-default">
		<div class="panel-heading">
			<ul class="breadcrumb">
				<li><a href="<{:U('index')}>">插件管理</a> </li>
				<li class="active">添加插件</li>
			</ul>
		</div>
		<div class="panel-body">
			<form id="myform" method="post" class="form-horizontal" action="<{:U('add_addons')}>">
				<div class="form-group">
				<input type="hidden" value="<{$data.id}>" name="id" />
					<label for="input-title"   class="col-sm-2 control-label">插件名</label>
					<div class="col-sm-7">
						<input  type="text" class="form-control"   id="name" name="name" value="<{$data.name}>">
					</div>
				</div>
				<div class="form-group">
					<label for="input-title"   class="col-sm-2 control-label">名称</label>
					<div class="col-sm-7">
						<input  type="text" class="form-control"   id="title" name="title" value="<{$data.title}>">
					</div>
				</div>
				
				<div class="form-group">
					<label for="input-title"   class="col-sm-2 control-label">是否显示链接</label>
					<div class="col-sm-7">
					<{:form_radio('show_url',array('1'=>'显示','2'=>'隐藏'),$data['show_url'])}>
					
					</div>
				</div>
				
				<div class="form-group">
					<label for="input-title"   class="col-sm-2 control-label">链接</label>
					<div class="col-sm-7">
						<input  type="text"  placeholder="默认为插件Index/index"  class="form-control" id="url" name="url" value="<{$data.url}>">
					</div>
				</div>
				
				
				<div class="form-group">
					<label for="input-title"   class="col-sm-2 control-label">描述</label>
					<div class="col-sm-7">
						<input  type="text" class="form-control"   id="description" name="description" value="<{$data.description}>">
					</div>
				</div>
				 
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-7">
						<button type="submit" class="btn btn-primary">保存</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<script>
 
$(function(){
    $(".form-horizontal").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
            name: {
                message: '名称',
                validators: {
                    notEmpty: {
                        message: '不能为空'
                    },
                }
            },
			
        }
    });
	
 
});
 </script> 
